import 'package:tushare_flutter/generated/json/base/json_convert_content.dart';
import 'package:tushare_flutter/pojo/stock_detail_entity.dart';

StockDetailEntity $StockDetailEntityFromJson(Map<String, dynamic> json) {
  final StockDetailEntity stockDetailEntity = StockDetailEntity();
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    stockDetailEntity.name = name;
  }
  final String? ename = jsonConvert.convert<String>(json['ename']);
  if (ename != null) {
    stockDetailEntity.ename = ename;
  }
  final String? market = jsonConvert.convert<String>(json['market']);
  if (market != null) {
    stockDetailEntity.market = market;
  }
  final String? ldate = jsonConvert.convert<String>(json['ldate']);
  if (ldate != null) {
    stockDetailEntity.ldate = ldate;
  }
  final String? sprice = jsonConvert.convert<String>(json['sprice']);
  if (sprice != null) {
    stockDetailEntity.sprice = sprice;
  }
  final String? principal = jsonConvert.convert<String>(json['principal']);
  if (principal != null) {
    stockDetailEntity.principal = principal;
  }
  final String? rdate = jsonConvert.convert<String>(json['rdate']);
  if (rdate != null) {
    stockDetailEntity.rdate = rdate;
  }
  final String? rprice = jsonConvert.convert<String>(json['rprice']);
  if (rprice != null) {
    stockDetailEntity.rprice = rprice;
  }
  final String? instype = jsonConvert.convert<String>(json['instype']);
  if (instype != null) {
    stockDetailEntity.instype = instype;
  }
  final String? organ = jsonConvert.convert<String>(json['organ']);
  if (organ != null) {
    stockDetailEntity.organ = organ;
  }
  final String? secre = jsonConvert.convert<String>(json['secre']);
  if (secre != null) {
    stockDetailEntity.secre = secre;
  }
  final String? phone = jsonConvert.convert<String>(json['phone']);
  if (phone != null) {
    stockDetailEntity.phone = phone;
  }
  final String? sphone = jsonConvert.convert<String>(json['sphone']);
  if (sphone != null) {
    stockDetailEntity.sphone = sphone;
  }
  final String? fax = jsonConvert.convert<String>(json['fax']);
  if (fax != null) {
    stockDetailEntity.fax = fax;
  }
  final String? sfax = jsonConvert.convert<String>(json['sfax']);
  if (sfax != null) {
    stockDetailEntity.sfax = sfax;
  }
  final String? email = jsonConvert.convert<String>(json['email']);
  if (email != null) {
    stockDetailEntity.email = email;
  }
  final String? semail = jsonConvert.convert<String>(json['semail']);
  if (semail != null) {
    stockDetailEntity.semail = semail;
  }
  final String? site = jsonConvert.convert<String>(json['site']);
  if (site != null) {
    stockDetailEntity.site = site;
  }
  final String? post = jsonConvert.convert<String>(json['post']);
  if (post != null) {
    stockDetailEntity.post = post;
  }
  final String? infosite = jsonConvert.convert<String>(json['infosite']);
  if (infosite != null) {
    stockDetailEntity.infosite = infosite;
  }
  final String? oname = jsonConvert.convert<String>(json['oname']);
  if (oname != null) {
    stockDetailEntity.oname = oname;
  }
  final String? addr = jsonConvert.convert<String>(json['addr']);
  if (addr != null) {
    stockDetailEntity.addr = addr;
  }
  final String? oaddr = jsonConvert.convert<String>(json['oaddr']);
  if (oaddr != null) {
    stockDetailEntity.oaddr = oaddr;
  }
  final String? desc = jsonConvert.convert<String>(json['desc']);
  if (desc != null) {
    stockDetailEntity.desc = desc;
  }
  final String? bscope = jsonConvert.convert<String>(json['bscope']);
  if (bscope != null) {
    stockDetailEntity.bscope = bscope;
  }
  final String? idea = jsonConvert.convert<String>(json['idea']);
  if (idea != null) {
    stockDetailEntity.idea = idea;
  }
  final String? printype = jsonConvert.convert<String>(json['printype']);
  if (printype != null) {
    stockDetailEntity.printype = printype;
  }
  final String? referrer = jsonConvert.convert<String>(json['referrer']);
  if (referrer != null) {
    stockDetailEntity.referrer = referrer;
  }
  final String? putype = jsonConvert.convert<String>(json['putype']);
  if (putype != null) {
    stockDetailEntity.putype = putype;
  }
  final String? pe = jsonConvert.convert<String>(json['pe']);
  if (pe != null) {
    stockDetailEntity.pe = pe;
  }
  final String? firgu = jsonConvert.convert<String>(json['firgu']);
  if (firgu != null) {
    stockDetailEntity.firgu = firgu;
  }
  final String? lastgu = jsonConvert.convert<String>(json['lastgu']);
  if (lastgu != null) {
    stockDetailEntity.lastgu = lastgu;
  }
  final String? realgu = jsonConvert.convert<String>(json['realgu']);
  if (realgu != null) {
    stockDetailEntity.realgu = realgu;
  }
  final String? planm = jsonConvert.convert<String>(json['planm']);
  if (planm != null) {
    stockDetailEntity.planm = planm;
  }
  final String? realm = jsonConvert.convert<String>(json['realm']);
  if (realm != null) {
    stockDetailEntity.realm = realm;
  }
  final String? pubfee = jsonConvert.convert<String>(json['pubfee']);
  if (pubfee != null) {
    stockDetailEntity.pubfee = pubfee;
  }
  final String? collect = jsonConvert.convert<String>(json['collect']);
  if (collect != null) {
    stockDetailEntity.collect = collect;
  }
  final String? signfee = jsonConvert.convert<String>(json['signfee']);
  if (signfee != null) {
    stockDetailEntity.signfee = signfee;
  }
  final String? pdate = jsonConvert.convert<String>(json['pdate']);
  if (pdate != null) {
    stockDetailEntity.pdate = pdate;
  }
  return stockDetailEntity;
}

Map<String, dynamic> $StockDetailEntityToJson(StockDetailEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['name'] = entity.name;
  data['ename'] = entity.ename;
  data['market'] = entity.market;
  data['ldate'] = entity.ldate;
  data['sprice'] = entity.sprice;
  data['principal'] = entity.principal;
  data['rdate'] = entity.rdate;
  data['rprice'] = entity.rprice;
  data['instype'] = entity.instype;
  data['organ'] = entity.organ;
  data['secre'] = entity.secre;
  data['phone'] = entity.phone;
  data['sphone'] = entity.sphone;
  data['fax'] = entity.fax;
  data['sfax'] = entity.sfax;
  data['email'] = entity.email;
  data['semail'] = entity.semail;
  data['site'] = entity.site;
  data['post'] = entity.post;
  data['infosite'] = entity.infosite;
  data['oname'] = entity.oname;
  data['addr'] = entity.addr;
  data['oaddr'] = entity.oaddr;
  data['desc'] = entity.desc;
  data['bscope'] = entity.bscope;
  data['idea'] = entity.idea;
  data['printype'] = entity.printype;
  data['referrer'] = entity.referrer;
  data['putype'] = entity.putype;
  data['pe'] = entity.pe;
  data['firgu'] = entity.firgu;
  data['lastgu'] = entity.lastgu;
  data['realgu'] = entity.realgu;
  data['planm'] = entity.planm;
  data['realm'] = entity.realm;
  data['pubfee'] = entity.pubfee;
  data['collect'] = entity.collect;
  data['signfee'] = entity.signfee;
  data['pdate'] = entity.pdate;
  return data;
}

extension StockDetailEntityExtension on StockDetailEntity {
  StockDetailEntity copyWith({
    String? name,
    String? ename,
    String? market,
    String? ldate,
    String? sprice,
    String? principal,
    String? rdate,
    String? rprice,
    String? instype,
    String? organ,
    String? secre,
    String? phone,
    String? sphone,
    String? fax,
    String? sfax,
    String? email,
    String? semail,
    String? site,
    String? post,
    String? infosite,
    String? oname,
    String? addr,
    String? oaddr,
    String? desc,
    String? bscope,
    String? idea,
    String? printype,
    String? referrer,
    String? putype,
    String? pe,
    String? firgu,
    String? lastgu,
    String? realgu,
    String? planm,
    String? realm,
    String? pubfee,
    String? collect,
    String? signfee,
    String? pdate,
  }) {
    return StockDetailEntity()
      ..name = name ?? this.name
      ..ename = ename ?? this.ename
      ..market = market ?? this.market
      ..ldate = ldate ?? this.ldate
      ..sprice = sprice ?? this.sprice
      ..principal = principal ?? this.principal
      ..rdate = rdate ?? this.rdate
      ..rprice = rprice ?? this.rprice
      ..instype = instype ?? this.instype
      ..organ = organ ?? this.organ
      ..secre = secre ?? this.secre
      ..phone = phone ?? this.phone
      ..sphone = sphone ?? this.sphone
      ..fax = fax ?? this.fax
      ..sfax = sfax ?? this.sfax
      ..email = email ?? this.email
      ..semail = semail ?? this.semail
      ..site = site ?? this.site
      ..post = post ?? this.post
      ..infosite = infosite ?? this.infosite
      ..oname = oname ?? this.oname
      ..addr = addr ?? this.addr
      ..oaddr = oaddr ?? this.oaddr
      ..desc = desc ?? this.desc
      ..bscope = bscope ?? this.bscope
      ..idea = idea ?? this.idea
      ..printype = printype ?? this.printype
      ..referrer = referrer ?? this.referrer
      ..putype = putype ?? this.putype
      ..pe = pe ?? this.pe
      ..firgu = firgu ?? this.firgu
      ..lastgu = lastgu ?? this.lastgu
      ..realgu = realgu ?? this.realgu
      ..planm = planm ?? this.planm
      ..realm = realm ?? this.realm
      ..pubfee = pubfee ?? this.pubfee
      ..collect = collect ?? this.collect
      ..signfee = signfee ?? this.signfee
      ..pdate = pdate ?? this.pdate;
  }
}